using System;


namespace BizElements.BusinessLayer
{
    /// <summary>
    /// Provides data for events which pass business rules as arguments.
    /// </summary>
    public sealed class BusinessRuleEventArgs : EventArgs
    {
        #region BusinessRuleEventArgs.

        BusinessRuleCollection businessRules;

        /// <summary>
        /// Initializes a new instance of <b>BusinessRuleEventArgs</b> class.
        /// </summary>
        /// <param name="businessRules">Business rules which caused the event to be raised.</param>
        public BusinessRuleEventArgs(BusinessRuleCollection businessRules)
        {
            this.businessRules = businessRules;
        }

        /// <summary>
        /// Initializes a new instance of <b>BusinessRuleEventArgs</b> class.
        /// </summary>
        /// <param name="businessRule">Business rule which caused the event to be raised.</param>
        public BusinessRuleEventArgs(BusinessRule businessRule)
        {
            this.businessRules = new BusinessRuleCollection(businessRule);
        }

        /// <summary>
        /// Gets the business rules which caused the event to be raised.
        /// </summary>
        public BusinessRuleCollection BusinessRules
        {
            get { return this.businessRules; }
        }

        #endregion
    }
}